/**
 * Universita' degli Studi di Palermo, 2010-11, License GNU GPL 3 (http://www.gnu.org/licenses/gpl.html)
 */
package org.unipa.botplatform.model.simple.interaction;

import java.util.Calendar;

/**
 * Crosstalk class models a single cross talk of a dialogue between a bot and a user.
 * <br>
 * A Crosstalk has an associated timestamp (of class {@link Calendar}), and it has two parts:
 * <li>snip, indicating what the bot said,
 * <li>snap, indicating what the user said.
 * <br>
 * This order is totally conventional, so it's possible to reverse it during construction of the object,
 * but this is discouraged.
 * <br> <br>
 * @author Giuseppe Miceli
 *
 */
public class Crosstalk {
	private String snip;
	/**
	 * @return the timestamp
	 */
	public Calendar getTimestamp() {
		return timestamp;
	}
	/**
	 * @param timestamp the timestamp to set
	 */
	public void setTimestamp(Calendar timestamp) {
		this.timestamp = timestamp;
	}
	private String snap;
	private Calendar timestamp;

	/**
	 * @return What bot said
	 */
	public String getSnip() {
		return snip;
	}
	/**
	 * @param snip the snip to set
	 */
	protected void setSnip(String snip) {
		this.snip = snip;
	}
	/**
	 * @return What user said
	 */
	public String getSnap() {
		return snap;
	}
	/**
	 * @param snap the snap to set (what user said)
	 */
	protected void setSnap(String snap) {
		this.snap = snap;
	}
	/**
	 * @param snip What the bot said
	 * @param snap What the user said
	 */
	public Crosstalk(String snip, String snap) {
		super();
		this.snip = snip;
		this.snap = snap;
		this.timestamp = Calendar.getInstance();
	}
	/**
	 * @param snip What the bot said
	 * @param snap What the user said
	 * @param timestamp The timestamp
	 */
	public Crosstalk(String snip, String snap, Calendar timestamp) {
		super();
		this.snip = snip;
		this.snap = snap;
		this.timestamp = timestamp;
	}
	/**
	 * Creates a Crosstalk with a timestamp.
	 */
	public Crosstalk() {	
		super();
		this.timestamp = Calendar.getInstance();
	}	
}
